package pl.smath.regex.tree.vertexes.pair;

import pl.smath.regex.tree.vertexes.Vertex;

public abstract class AbsPairVertex extends Vertex {
	
	private Vertex left;
	private Vertex right;
	
	public AbsPairVertex(Vertex l, Vertex r) {
		this.setLeft(l);
		this.setRight(r);
	}
	
	public AbsPairVertex new_instance() {
		return this;
	}
	
	public String getName() {
		return "ABS_PAIR";
	}
	
	public String serialize() {
		return getName() + "[" + left.serialize() + "," + right.serialize() + "]";
	}

	public void setLeft(Vertex left) {
		this.left = left;
	}

	public void setRight(Vertex right) {
		this.right = right;
	}
	
	public Vertex getLeft() {
		return left;
	}

	public Vertex getRight() {
		return right;
	}
}
